import request from '@/utils/request'

const url = 'souvenir/cart/'

export const addCart = (data) => {
  return request({
    url: url + 'addCart',
    method: 'post',
    data
  })
}

export const updateCart = (data) => {
  return request({
    url: url + 'updateCart',
    method: 'put',
    data
  })
}

export const deleteCart = (cartId) => {
  return request({
    url: url + 'deleteCart' + '/' + cartId,
    method: 'delete'
  })
}

export const getCartWithPage = (data) => {
  return request({
    url: url + 'getCartWithPage',
    method: 'post',
    data
  })
}

export const getCartById = (cartId) => {
  return request({
    url: url + 'getCartById' + '/' + cartId,
    method: 'get'
  })
}
